home *** CD-ROM | disk | FTP | other *** search
/ Mesolore / Mesolore - Disc 2.iso / mac / data / Atlas.dir / 00113_Script_113 < prev    next >
Text File  |  2001-01-26  |  3KB  |  118 lines

  1. Global gshowGazeteer, glastcoord, glastcityname
  2.  
  3. on updateMap
  4.   if glastcoord <> "" then 
  5.     findcity glastcoord, glastcityname
  6.   end if
  7. end
  8.  
  9. on findcity which, cityname, fullname
  10.   put cityname
  11.   if "mixteca mixtecazoom" contains the frameLabel then
  12.     nothing 
  13.   else
  14.     goto "mixteca"
  15.     updatestage
  16.   end if
  17.   glastcityname = cityname
  18.   glastcoord = which
  19.   if the framelabel = "mixteca" then
  20.     (sprite 2).visible = 0
  21.     updatestage
  22.     start = point(404,250)
  23.     y = value(which)/2.5 -- town location
  24.     put y
  25.     z = point(200,200) -- difference
  26.     
  27.     moveto = start-(y- z)
  28.     h=getAt(moveto,1)
  29.     v=getAt(moveto,2)
  30.     if h < 411 then h = 411
  31.     if h > 412 then h = 412
  32.     if v < 189 then v = 189
  33.     if v > 312 then v = 312
  34.     setAt(moveto,1,h)
  35.     setAt(moveto,2,v)
  36.     
  37.     (sprite 1).loc = moveto
  38.     updatestage
  39.     maplist = the rect of sprite 1
  40.     
  41.     y = y + point(getat(maplist,1),getat(maplist,2))
  42.     (sprite 2).loc = y
  43.     (sprite 2).visible = 1
  44.     updatestage
  45.   else
  46.     (sprite 2).visible = 0
  47.     updatestage
  48.     start = point(404,250)
  49.     y = value(which) -- town location
  50.     z = point(500,500) -- difference
  51.     
  52.     moveto = start-(y- z)
  53.     h=getAt(moveto,1)
  54.     v=getAt(moveto,2)
  55.     if h < 120 then h = 120
  56.     if h > 720 then h = 720
  57.     if v < -119 then v = -119
  58.     if v > 627 then v = 627
  59.     setAt(moveto,1,h)
  60.     setAt(moveto,2,v)
  61.     
  62.     (sprite 1).loc = moveto
  63.     updatestage
  64.     maplist = the rect of sprite 1
  65.     
  66.     y = y + point(getat(maplist,1),getat(maplist,2))
  67.     (sprite 2).loc = y
  68.     (sprite 2).visible = 1
  69.     updatestage
  70.   end if
  71.   put cityname
  72.   if the number of member cityname > 0 then
  73.     set the member of sprite 9 = cityname
  74.   else
  75.     set the member of sprite 9 = "No_Glyph"
  76.   end if
  77.   
  78.   if the number of member ("t_" & cityname) > 0 then
  79.     
  80.     --      beep
  81.     set the member of sprite 8 = ("t_" & cityname)
  82.     sendSprite(12, #CustomScrollbar_SwapMember,the member of sprite 8)
  83.     sendSprite(13, #CustomScrollbar_SwapMember,the member of sprite 8)
  84.     sendSprite(14, #CustomScrollbar_SwapMember,the member of sprite 8)
  85.     sendSprite(15, #CustomScrollbar_SwapMember,the member of sprite 8)
  86.   else
  87.     put fullname into field "textholder"
  88.     set the member of sprite 8 = ("textholder")
  89.     sendSprite(12, #CustomScrollbar_SwapMember,the member of sprite 8)
  90.     sendSprite(13, #CustomScrollbar_SwapMember,the member of sprite 8)
  91.     sendSprite(14, #CustomScrollbar_SwapMember,the member of sprite 8)
  92.     sendSprite(15, #CustomScrollbar_SwapMember,the member of sprite 8)
  93.   end if
  94.   
  95.   updatestage
  96.   
  97. end
  98.  
  99. on setupMIAW windowName, windowFile, wType
  100.   set the fileName of window windowName to windowFile
  101.   if wtype= "void" then
  102.     set the windowType of window windowName to 2
  103.   else
  104.     set the windowType of window windowName to wType
  105.   end if
  106. end setupMIAW
  107.  
  108. on showGazeteer
  109.   set gshowGazeteer= not gshowGazeteer
  110.   if gshowGazeteer = TRUE then 
  111.     open window("Select a Site")
  112.     set the windowtype of window "Select a Site" = 4
  113.   else
  114.     close window("Select a Site")
  115.   end if
  116. end
  117.  
  118.